{include file="layout/header" title="微信会员" /}
{include file="layout/sidebar" /}
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            会员管理
            <small>微信会员</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 会员管理</a></li>
            <li class="active">微信会员</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <!-- /.box -->
        <div class="box">
            <div class="box-header with-border">
                <h3 class="box-title"> 共有<strong style="color:red;">{$userCount}</strong>个粉丝已经提交会员申请 </h3>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
                 <!-- search form -->
                <form action="" method="get" class="sidebar-form0" style="width:80%;margin: 0 auto;">
                    <div class="input-group">                        
                        <input type="text" name="q" class="form-control" value="{$q ? $q : '';}" placeholder="请输入昵称...">
                        <span class="input-group-btn">
                            <button type="submit" id="search-btn" class="btn btn-flat">
                                <i class="fa fa-search"></i>
                            </button>
                        </span>
                    </div>
                </form>
                <!-- /.search form -->
                <table class="table table-bordered">
                    <tr>
                        <th>ID</th>
                        <th>微信openid</th>
                        <th>昵称</th>
                        <th>头像</th>
                        <th>关注时间</th>
                        <th>会员状态</th>
                        <th>会员卡号</th>
                        <th>真实姓名</th>
                        <th>电话号码</th>
                        <th>出生年月</th>
                        <th>家庭地址</th>
                        <th>优惠券</th>
                        <th>操作</th>
                    </tr>
                    {volist name='list' id='user'}
                    <tr>
                        <td>{$user.id}</td>
                        <td>{$user.openid}</td>
                        <!--<td>{:base64_decode($user.nickname)}</td>-->
						<td>{$user.nickname}</td>
                        <td><img src="{$user.headimgurl}" width="25px" height="25px"></td>
                        <td>{$user['subscribe']|date="Y/m/d H:i:s",###}</td>
                        <td>
                            {switch name="$user.status"}
                                {case value="0"}<strong style="color:red;">已提交</strong>{/case}
                                {case value="1"}<strong style="color:green;">已绑定</strong>{/case}
                                {default /}未绑定
                            {/switch}
                        </td>
                        <td>{$user.cardno}</td>
                        <td>{$user.fullname}</td>
                        <td>{$user.mobile}</td>
                        <td>{$user.birthday}</td>
                        <td>{$user.address}</td>
                        <td><a href='/admin/card/record?q={$user.openid}' class="badge bg-green">查看</a></td>
                        <td>
                            <a href="{:url('User/change',['openid' => $user.openid,'status' => 1,'page' => $page,'q' => $q])}" class="badge bg-green">通过</a>
                            <a href="{:url('User/change',['openid' => $user.openid,'status' => -1,'page' => $page,'q' => $q])}" class="badge bg-red">不通过</a>
                        </td>
                    </tr>
                    {/volist}
                </table>
            </div>
            <!-- /.box-body -->
            <div class="box-footer clearfix">
                <ul class="pagination pagination-sm no-margin pull-right">
                    {$list->render()}
                </ul>
            </div>
        </div>
        <!-- /.box -->
    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->

{include file="layout/footer" /}